﻿using System;
using Glue;
using Xunit;

namespace GlueExamples
{
    namespace TestingMapping
    {
        public class When_mapping_should_work
        {
            private readonly Mapping<DomainPerson, GuiPerson> mapping;
            private readonly IMapperVerification<DomainPerson, GuiPerson> verification;

            private class DomainPerson { public String FirstName { get; set; } }
            private class GuiPerson { public String FirstName { get; set; } }

            public When_mapping_should_work()
            {
                mapping = new Mapping<DomainPerson, GuiPerson>();
                mapping.AutoRelateEqualNames();
                verification = mapping.GetMapperVerification();
            }

            [Fact]
            public void Should_verify_when_relations_exists()
            {
                verification.AssertMapsCorrectlyTowards(new GuiPerson());
                verification.AssertMapsCorrectlyTowards(new DomainPerson());
            }
        }
    } 
  
}
